
<template>
  <div class="nav-body">
    <ul class="nav-parent" >

      <li v-for="navList in nodesLink" v-if="navList.navType===navType">
        <p class="nav-title" @click="navNodeShow(navList)">
          <span class="glyphicon glyphicon-folder-open"></span>
          {{navList.title}}
        </p>
        <!-- @mouseleave="hiddenHelp($event)"
                     @mouseenter="showHelp($event)"-->
          <ul class="nav-children" v-show="navList.thisChildrenShow">
            <li
              class="nav-children-li"
              :class="{'nav-active': isActive === childrenNavList.link}"
              v-for="(childrenNavList,index) in navList.childrenNodes"
              @click="setActive(childrenNavList)"
            >
              <router-link :to="childrenNavList.link">
                <span class="glyphicon glyphicon-link"></span>
                <!--   :class="{active:childrenNavList.active}" -->
                {{childrenNavList.title}}
              </router-link>
            </li>
          </ul>
      </li>
      <li v-if="true && navConfigType != 'ZhongTai' ">
        <p class="nav-title" @click="staticNavNodeShow">
          <span class="glyphicon glyphicon-folder-open"></span>
          调度中心
        </p>
        <ul class="nav-children" v-show="nodesFadeInObj.msgController">
          <li
            class="nav-children-li"
          >
            <a :href="webAdmin" target="_blank">
              <span class="glyphicon glyphicon-link"></span>
              调度中心
            </a>
          </li>
        </ul>
      </li>

   <!--   &lt;!&ndash;基础信息管理&ndash;&gt;
      <li v-if="false">
        <p class="nav-title" @click="navNodeShow('msgController')"><span class="glyphicon glyphicon-folder-open"></span>基础信息管理</p>
        <ul v-show="nodesFadeInObj.msgController" class="nav-children">
          <li>
            <router-link  to="/">
              <span class="glyphicon glyphicon-user"></span>
              用户管理
            </router-link>
          </li>

          <li>
            <router-link to="/policeController">
              <span class="glyphicon glyphicon-user"></span>
              警员管理
            </router-link>
          </li>

          <li>
            <router-link to="/sectionController">
              <span class="glyphicon glyphicon-tree-deciduous"></span>
              部门管理
            </router-link>
          </li>

          <li>
            <router-link to="/roleController">
              <span class="glyphicon glyphicon-leaf"></span>
              角色管理
            </router-link>
          </li>

          <li>
            <router-link to="/jurisdictionController">
              <span class="glyphicon glyphicon-tower"></span>
              权限因子管理
            </router-link>
          </li>
          <li>
            <router-link to="/addressAdminController">
              <span class="glyphicon glyphicon-comment"></span>
              通讯录管理
            </router-link>
          </li>
          <li>
            <router-link to="/positionManageController">
              <span class="glyphicon glyphicon-eye-open"></span>
              职位管理
            </router-link>
          </li>

        </ul>
      </li>
      &lt;!&ndash;宫格配置&ndash;&gt;
      <li v-if="false">
        <p class="nav-title" @click="navNodeShow('menuController')"><span class="glyphicon glyphicon-folder-open"></span>宫格配置</p>
        <ul v-show="nodesFadeInObj.menuController" class="nav-children">

          <li>
            <router-link  to="/programLib">
              <span class="glyphicon glyphicon-link"></span>
              方案库
            </router-link>
          </li>

          <li>
            <router-link  to="/menuLib">
              <span class="glyphicon glyphicon-link"></span>
              菜单管理
            </router-link>
          </li>

           <li>
            <router-link  to="/linkLib">
              <span class="glyphicon glyphicon-link"></span>
              素材链接库
            </router-link>
          </li>

           <li>
            <router-link  to="/picLib">
              <span class="glyphicon glyphicon-link"></span>
              素材图片库
            </router-link>
          </li>

          <li>
            <router-link  to="/dataObject">
              <span class="glyphicon glyphicon-link"></span>
              数据授权
            </router-link>
          </li>



        </ul>
      </li>
      &lt;!&ndash;资源信息管理&ndash;&gt;
      <li v-if="false">
        <p class="nav-title" @click="navNodeShow('resourceController')"><span class="glyphicon glyphicon-folder-open"></span>资源信息管理</p>
        <ul class="nav-children" v-show="nodesFadeInObj.resourceController">

          <li>
            <router-link  to="/VehicleController">
              <span class="glyphicon glyphicon-compressed"></span>
              警车管理
            </router-link>
          </li>

          <li>
            <router-link  to="/RadioController">
              <span class="glyphicon glyphicon-phone-alt"></span>
              手台管理
            </router-link>
          </li>

          <li>
            <router-link  to="/MonitorController">
              <span class="glyphicon glyphicon-earphone"></span>
              单兵管理
            </router-link>
          </li>

          <li>
            <router-link  to="/AppController">
              <span class="glyphicon glyphicon-phone"></span>
              警务通管理
            </router-link>
          </li>

        </ul>
      </li>
      &lt;!&ndash;点位管理&ndash;&gt;
      <li v-if="false">
        <p class="nav-title" @click="navNodeShow('dotController')"><span class="glyphicon glyphicon-folder-open"></span>点位管理</p>
        <ul class="nav-children" v-show="nodesFadeInObj.dotController">

          <li>
            <router-link  to="/OldDotController">
              <span class="glyphicon glyphicon-link"></span>
              1.0点资源管理
            </router-link>
          </li>

          <li>
            <router-link  to="/OldLineController">
              <span class="glyphicon glyphicon-link"></span>
              1.0线资源管理
            </router-link>
          </li>

          <li>
            <router-link  to="/OldFaceController">
              <span class="glyphicon glyphicon-link"></span>
              1.0面资源管理
            </router-link>
          </li>

          <li>
            <router-link  to="/CameraController">
              <span class="glyphicon glyphicon-link"></span>
              摄像头管理
            </router-link>
          </li>

          <li>
            <router-link  to="/WIFIController">
              <span class="glyphicon glyphicon-link"></span>
              WIFI探针管理
            </router-link>
          </li>

          <li>
            <router-link  to="/PersonnelController">
              <span class="glyphicon glyphicon-link"></span>
              人员流动管理
            </router-link>
          </li>

          <li>
            <router-link  to="/SiteController">
              <span class="glyphicon glyphicon-link"></span>
              场所管理
            </router-link>
          </li>

          <li>
            <router-link  to="/VenueController">
              <span class="glyphicon glyphicon-link"></span>
              场馆管理
            </router-link>
          </li>

          <li>
            <router-link  to="/UnitsController">
              <span class="glyphicon glyphicon-link"></span>
              党政机关
            </router-link>
          </li>

          <li>
            <router-link  to="/AirportsAndRailwayStationsController">
              <span class="glyphicon glyphicon-link"></span>
              一场四站管理
            </router-link>
          </li>

          <li>
            <router-link  to="/DomicileController">
              <span class="glyphicon glyphicon-link"></span>
              住地管理
            </router-link>
          </li>

          <li>
            <router-link  to="/HeadquartersController">
              <span class="glyphicon glyphicon-link"></span>
              指挥部管理
            </router-link>
          </li>

          <li>
            <router-link  to="/CircuitController">
              <span class="glyphicon glyphicon-link"></span>
              安保线路管理
            </router-link>
          </li>

          <li>
            <router-link  to="/ThreeCircleController">
              <span class="glyphicon glyphicon-link"></span>
              三圈管理
            </router-link>
          </li>

          <li>
            <router-link  to="/TrafficControlLoopController">
              <span class="glyphicon glyphicon-link"></span>
              封控圈管理
            </router-link>
          </li>

          <li>
            <router-link  to="/IconController">
              <span class="glyphicon glyphicon-link"></span>
              图标管理
            </router-link>
          </li>

        </ul>
      </li>-->

    </ul>
  </div>
</template>

<script>
  export default {
    name: "NavStatic",
    props:{
      initNav:Object
    },
    data(){
      return{
        isActive:"",
        nodesLink:[],
        nodesFadeInObj:{
          msgController:false,
          menuController:false,
          resourceController:false,
          dotController:false,
        },
        navType:"",
        navConfigType: navConfig
      }
    },
    mounted(){
      this.navType = sessionStorage.getItem("navType");
      //console.log(this.navType);
      if( navConfig === "WuHan" ){
        this.nodesLink=[
          {
            "thisChildrenShow":true,
            "title":"基础信息管理",
            "navType":"",
            "childrenNodes":[
              {"title":"用户管理","link":"/userController","active":false},
              {"title":"警员管理","link":"/policeController","active":false},
              {"title":"部门管理","link":"/sectionController","active":false},
              {"title":"角色管理","link":"/roleController","active":false},
              {"title":"权限因子管理","link":"/jurisdictionController","active":false},
            ]
          },
          {
            "thisChildrenShow":false,
            "title":"宫格配置",
            "navType":"",
            "childrenNodes":[
              {"title":"方案库","link":"/programLib","active":false},
              {"title":"菜单管理","link":"/menuLib","active":false},
              {"title":"素材链接库","link":"/linkLib","active":false},
              {"title":"素材图片库","link":"/picLib","active":false},
              {"title":"数据权限管理","link":"/dataObject","active":false},
            ]
          },
          {
            "thisChildrenShow":false,
            "title":"资源信息管理",
            "navType":"",
            "childrenNodes":[
              {"title":"警车管理","link":"/VehicleController","active":false},
              {"title":"手台管理","link":"/RadioController","active":false},
              {"title":"单兵管理","link":"/MonitorController","active":false},
              {"title":"警务通管理","link":"/AppController","active":false},
            ]
          },
          {
            "thisChildrenShow":false,
            "title":"点位管理",
            "navType":"",
            "childrenNodes":[
              {"title":"1.0点资源管理","link":"/OldDotController","active":false},
              {"title":"1.0线资源管理","link":"/OldLineController","active":false},
              {"title":"1.0面资源管理","link":"/OldFaceController","active":false},
              {"title":"摄像头管理","link":"/CameraController","active":false},
              {"title":"WIFI探针管理","link":"/WIFIController","active":false},
              {"title":"人员流动管理","link":"/PersonnelController","active":false},
              {"title":"场所管理","link":"/SiteController","active":false},
              {"title":"场馆管理","link":"/VenueController","active":false},
              {"title":"党政机关","link":"/UnitsController","active":false},
              {"title":"一场四站管理","link":"/AirportsAndRailwayStationsController","active":false},
              {"title":"住地管理","link":"/DomicileController","active":false},
              {"title":"指挥部管理","link":"/HeadquartersController","active":false},
              {"title":"安保线路管理","link":"/CircuitController","active":false},
              {"title":"三圈管理","link":"/ThreeCircleController","active":false},
              {"title":"封控圈管理","link":"/TrafficControlLoopController","active":false},
              {"title":"辖区管理","link":"/areaController","active":false},
              {"title":"图标管理","link":"/IconController","active":false},
            ]
          },
          {
            "thisChildrenShow":false,
            "title":"重点人信息管理",
            "navType":"ZDR",
            "childrenNodes":[
              {"title":"重点人管理","link":"/keyPersonListController","active":false},
              {"title":"重点人类型","link":"/keyPersonClassController","active":false},
            ]
          },
          {
            "thisChildrenShow":false,
            "title":"预案管理",
            "navType":"",
            "childrenNodes":[
              {"title":"应急物资","link":"/CaseResourceController","active":false},
              {"title":"处置预案","link":"/CaseListController","active":false},
              {"title":"专家管理","link":"/SpeciaListController","active":false},
              {"title":"专家组管理","link":"/SpecialistArrController","active":false},
            ]
          },
          {
            "thisChildrenShow":false,
            "title":"系统",
            "navType":"",
            "childrenNodes":[
              {"title":"审计日志","link":"/loggingWriteController","active":false},
              {"title":"字典管理","link":"/dictionaryController","active":false},
              {"title":"地图菜单","link":"/mapMenuController","active":false},
            ]
          },
          {
            "thisChildrenShow":false,
            "title":"中台监控平台",
            "navType":"",
            "childrenNodes":[
              {"title":"数据源配置","link":"/dataSourcesController","active":false},
              {"title":"数据内容定义","link":"/dataContentDefController","active":false},
              {"title":"任务配置","link":"/taskConfigController","active":false},
              {"title":"任务监控","link":"/taskMonitorController","active":false},
              {"title":"数据接入","link":"/kafkaDataAccessSituationController","active":false},
            ]
          },
        ];
        //console.log(this.webAdmin);
      }
      else if( navConfig === "GaoMi" || navConfig === "WeiFang" ){
        this.nodesLink=[
          {
            "thisChildrenShow":true,
            "title":"基础信息管理",
            "navType":"",
            "childrenNodes":[
              {"title":"用户管理","link":"/userController","active":false},
              {"title":"警员管理","link":"/policeController","active":false},
              {"title":"部门管理","link":"/sectionController","active":false},
              {"title":"角色管理","link":"/roleController","active":false},
              {"title":"权限因子管理","link":"/jurisdictionController","active":false},
     /*         {"title":"通讯录管理","link":"/addressAdminController","active":false},
              {"title":"职位管理","link":"/positionManageController","active":false},*/
            ]
          },
          {
            "thisChildrenShow":false,
            "title":"宫格配置",
            "navType":"",
            "childrenNodes":[
              {"title":"方案库","link":"/programLib","active":false},
              {"title":"菜单管理","link":"/menuLib","active":false},
              {"title":"素材链接库","link":"/linkLib","active":false},
              {"title":"素材图片库","link":"/picLib","active":false},
              {"title":"数据权限管理","link":"/dataObject","active":false},
            ]
          },
          {
            "thisChildrenShow":false,
            "title":"资源信息管理",
            "navType":"",
            "childrenNodes":[
              {"title":"警车管理","link":"/VehicleController","active":false},
              {"title":"手台管理","link":"/RadioController","active":false},
              {"title":"单兵管理","link":"/MonitorController","active":false},
              {"title":"警务通管理","link":"/AppController","active":false},
            ]
          },
          {
            "thisChildrenShow":false,
            "title":"点位管理",
            "navType":"",
            "childrenNodes":[
            /*  {"title":"1.0点资源管理","link":"/OldDotController","active":false},
              {"title":"1.0线资源管理","link":"/OldLineController","active":false},
              {"title":"1.0面资源管理","link":"/OldFaceController","active":false},*/
              {"title":"摄像头管理","link":"/CameraController","active":false},
              {"title":"WIFI探针管理","link":"/WIFIController","active":false},
              {"title":"人员流动管理","link":"/PersonnelController","active":false},
              {"title":"场所管理","link":"/SiteController","active":false},
              {"title":"场馆管理","link":"/VenueController","active":false},
              {"title":"党政机关","link":"/UnitsController","active":false},
              {"title":"一场四站管理","link":"/AirportsAndRailwayStationsController","active":false},
              {"title":"住地管理","link":"/DomicileController","active":false},
              {"title":"指挥部管理","link":"/HeadquartersController","active":false},
              {"title":"安保线路管理","link":"/CircuitController","active":false},
              {"title":"三圈管理","link":"/ThreeCircleController","active":false},
              {"title":"封控圈管理","link":"/TrafficControlLoopController","active":false},
              {"title":"辖区管理","link":"/areaController","active":false},
              {"title":"图标管理","link":"/IconController","active":false},
            ]
          },
          {
            "thisChildrenShow":false,
            "title":"预案管理",
            "navType":"",
            "childrenNodes":[
              {"title":"应急物资","link":"/CaseResourceController","active":false},
              {"title":"处置预案","link":"/CaseListController","active":false},
            ]
          },
          {
            "thisChildrenShow":false,
            "title":"系统",
            "navType":"",
            "childrenNodes":[
              {"title":"审计日志","link":"/loggingWriteController","active":false},
              {"title":"字典管理","link":"/dictionaryController","active":false},
              {"title":"地图菜单","link":"/mapMenuController","active":false},
            ]
          },
        ]
      }
      else if( navConfig === "JingMen" ){
        this.nodesLink=[
          {
            "thisChildrenShow":true,
            "title":"基础信息管理",
            "navType":"",
            "childrenNodes":[
              {"title":"用户管理","link":"/userController","active":false},
              {"title":"警员管理","link":"/policeController","active":false},
              {"title":"部门管理","link":"/sectionController","active":false},
              {"title":"角色管理","link":"/roleController","active":false},
              {"title":"权限因子管理","link":"/jurisdictionController","active":false},
              {"title":"通讯录管理","link":"/addressAdminController","active":false},
              {"title":"职位管理","link":"/positionManageController","active":false},
            ]
          },
          {
            "thisChildrenShow":false,
            "title":"宫格配置",
            "navType":"",
            "childrenNodes":[
              {"title":"方案库","link":"/programLib","active":false},
              {"title":"菜单管理","link":"/menuLib","active":false},
              {"title":"素材链接库","link":"/linkLib","active":false},
              {"title":"素材图片库","link":"/picLib","active":false},
              {"title":"数据权限管理","link":"/dataObject","active":false},
            ]
          },
          {
            "thisChildrenShow":false,
            "title":"资源信息管理",
            "navType":"",
            "childrenNodes":[
              {"title":"警车管理","link":"/VehicleController","active":false},
              {"title":"手台管理","link":"/RadioController","active":false},
              {"title":"单兵管理","link":"/MonitorController","active":false},
              {"title":"警务通管理","link":"/AppController","active":false},
            ]
          },
          {
            "thisChildrenShow":false,
            "title":"点位管理",
            "navType":"",
            "childrenNodes":[
        /*      {"title":"1.0点资源管理","link":"/OldDotController","active":false},
              {"title":"1.0线资源管理","link":"/OldLineController","active":false},
              {"title":"1.0面资源管理","link":"/OldFaceController","active":false},*/
              {"title":"摄像头管理","link":"/CameraController","active":false},
              {"title":"WIFI探针管理","link":"/WIFIController","active":false},
              {"title":"人员流动管理","link":"/PersonnelController","active":false},
              {"title":"场所管理","link":"/SiteController","active":false},
              {"title":"重点部位管理","link":"/VenueController","active":false},
              {"title":"党政机关","link":"/UnitsController","active":false},
              {"title":"一场四站管理","link":"/AirportsAndRailwayStationsController","active":false},
              {"title":"住地管理","link":"/DomicileController","active":false},
              {"title":"指挥部管理","link":"/HeadquartersController","active":false},
              {"title":"安保线路管理","link":"/CircuitController","active":false},
              {"title":"三圈管理","link":"/ThreeCircleController","active":false},
              {"title":"封控圈管理","link":"/TrafficControlLoopController","active":false},
              {"title":"辖区管理","link":"/areaController","active":false},
              {"title":"图标管理","link":"/IconController","active":false},
            ]
          },
          {
            "thisChildrenShow":false,
            "title":"重点人信息管理",
            "navType":"ZDR",
            "childrenNodes":[
              {"title":"重点人管理","link":"/keyPersonListController","active":false},
              {"title":"重点人类型","link":"/keyPersonClassController","active":false},
            ]
          },
          {
            "thisChildrenShow":false,
            "title":"预案管理",
            "navType":"",
            "childrenNodes":[
              {"title":"应急物资","link":"/CaseResourceController","active":false},
              {"title":"处置预案","link":"/CaseListController","active":false},
              {"title":"专家管理","link":"/SpeciaListController","active":false},
              {"title":"专家组管理","link":"/SpecialistArrController","active":false},
            ]
          },
          {
            "thisChildrenShow":false,
            "title":"系统",
            "navType":"",
            "childrenNodes":[
              {"title":"审计日志","link":"/loggingWriteController","active":false},
              {"title":"字典管理","link":"/dictionaryController","active":false},
              {"title":"地图菜单","link":"/mapMenuController","active":false},
            ]
          },
        ]
      }
      else if( navConfig === "HanKouHuoCheZhan" ){
        this.nodesLink=[
          {
            "thisChildrenShow":true,
            "title":"重点人信息管理",
            "childrenNodes":[
              {"title":"重点人管理","link":"/keyPersonListController","active":false},
              {"title":"重点人类型","link":"/keyPersonClassController","active":false},
            ]
          }
        ]
      }
      else if ( navConfig === "WeiFang" ) {
        this.nodesLink=[
          {
            "thisChildrenShow":true,
            "title":"基础信息管理",
            "navType":"",
            "childrenNodes":[
              {"title":"用户管理","link":"/userController","active":false},
              {"title":"警员管理","link":"/policeController","active":false},
              {"title":"部门管理","link":"/sectionController","active":false},
              {"title":"角色管理","link":"/roleController","active":false},
              {"title":"权限因子管理","link":"/jurisdictionController","active":false},
            ]
          },
          {
            "thisChildrenShow":false,
            "title":"宫格配置",
            "navType":"",
            "childrenNodes":[
              {"title":"方案库","link":"/programLib","active":false},
              {"title":"菜单管理","link":"/menuLib","active":false},
              {"title":"素材链接库","link":"/linkLib","active":false},
              {"title":"素材图片库","link":"/picLib","active":false},
              {"title":"数据权限管理","link":"/dataObject","active":false},
            ]
          },
          /*{
            "thisChildrenShow":false,
            "title":"资源信息管理",
            "navType":"",
            "childrenNodes":[
              {"title":"警车管理","link":"/VehicleController","active":false},
              {"title":"手台管理","link":"/RadioController","active":false},
              {"title":"单兵管理","link":"/MonitorController","active":false},
              {"title":"警务通管理","link":"/AppController","active":false},
            ]
          },*/
          /*{
            "thisChildrenShow":false,
            "title":"点位管理",
            "navType":"",
            "childrenNodes":[
              {"title":"1.0点资源管理","link":"/OldDotController","active":false},
              {"title":"1.0线资源管理","link":"/OldLineController","active":false},
              {"title":"1.0面资源管理","link":"/OldFaceController","active":false},
              {"title":"摄像头管理","link":"/CameraController","active":false},
              {"title":"WIFI探针管理","link":"/WIFIController","active":false},
              {"title":"人员流动管理","link":"/PersonnelController","active":false},
              {"title":"场所管理","link":"/SiteController","active":false},
              {"title":"场馆管理","link":"/VenueController","active":false},
              {"title":"党政机关","link":"/UnitsController","active":false},
              {"title":"一场四站管理","link":"/AirportsAndRailwayStationsController","active":false},
              {"title":"住地管理","link":"/DomicileController","active":false},
              {"title":"指挥部管理","link":"/HeadquartersController","active":false},
              {"title":"安保线路管理","link":"/CircuitController","active":false},
              {"title":"三圈管理","link":"/ThreeCircleController","active":false},
              {"title":"封控圈管理","link":"/TrafficControlLoopController","active":false},
              {"title":"辖区管理","link":"/areaController","active":false},
              {"title":"图标管理","link":"/IconController","active":false},
            ]
          },*/
         /* {
            "thisChildrenShow":false,
            "title":"重点人信息管理",
            "navType":"ZDR",
            "childrenNodes":[
              {"title":"重点人管理","link":"/keyPersonListController","active":false},
              {"title":"重点人类型","link":"/keyPersonClassController","active":false},
            ]
          },*/
          /*{
            "thisChildrenShow":false,
            "title":"预案管理",
            "navType":"",
            "childrenNodes":[
              {"title":"应急物资","link":"/CaseResourceController","active":false},
              {"title":"处置预案","link":"/CaseListController","active":false},
              {"title":"专家管理","link":"/SpeciaListController","active":false},
              {"title":"专家组管理","link":"/SpecialistArrController","active":false},
            ]
          },*/
          {
            "thisChildrenShow":false,
            "title":"系统",
            "navType":"",
            "childrenNodes":[
              {"title":"审计日志","link":"/loggingWriteController","active":false},
              {"title":"字典管理","link":"/dictionaryController","active":false},
              /*{"title":"地图菜单","link":"/mapMenuController","active":false},*/
            ]
          },
          /*{
            "thisChildrenShow":false,
            "title":"中台监控平台",
            "navType":"",
            "childrenNodes":[
              {"title":"数据源配置","link":"/dataSourcesController","active":false},
              {"title":"数据内容定义","link":"/dataContentDefController","active":false},
              {"title":"任务配置","link":"/taskConfigController","active":false},
              {"title":"任务监控","link":"/taskMonitorController","active":false},
              {"title":"数据接入","link":"/kafkaDataAccessSituationController","active":false},
            ]
          },*/
        ];
      }
      else if ( navConfig === "ZhongTai") {
        this.nodesLink=[{
          "thisChildrenShow":false,
          "title":"中台监控平台",
          "navType":"",
          "childrenNodes":[
          {"title":"数据源配置","link":"/dataSourcesController","active":false},
          {"title":"数据内容定义","link":"/dataContentDefController","active":false},
          {"title":"任务配置","link":"/taskConfigController","active":false},
          {"title":"任务监控","link":"/taskMonitorController","active":false},
          {"title":"数据接入","link":"/kafkaDataAccessSituationController","active":false},
        ]
        },]
      }
      else if ( navConfig === "XiaoGan" ){
        this.nodesLink=[
          {
            "thisChildrenShow":true,
            "title":"基础信息管理",
            "navType":"",
            "childrenNodes":[
              {"title":"用户管理","link":"/userController","active":false},
              {"title":"警员管理","link":"/policeController","active":false},
              {"title":"部门管理","link":"/sectionController","active":false},
              {"title":"角色管理","link":"/roleController","active":false},
              {"title":"权限因子管理","link":"/jurisdictionController","active":false},
            ]
          },
          {
            "thisChildrenShow":false,
            "title":"宫格配置",
            "navType":"",
            "childrenNodes":[
              {"title":"方案库","link":"/programLib","active":false},
              {"title":"菜单管理","link":"/menuLib","active":false},
              {"title":"素材链接库","link":"/linkLib","active":false},
              {"title":"素材图片库","link":"/picLib","active":false},
              {"title":"数据权限管理","link":"/dataObject","active":false},
            ]
          },
          {
            "thisChildrenShow":false,
            "title":"资源信息管理",
            "navType":"",
            "childrenNodes":[
              {"title":"警车管理","link":"/VehicleController","active":false},
              {"title":"手台管理","link":"/RadioController","active":false},
              {"title":"单兵管理","link":"/MonitorController","active":false},
              {"title":"警务通管理","link":"/AppController","active":false},
            ]
          },
          {
            "thisChildrenShow":false,
            "title":"点位管理",
            "navType":"",
            "childrenNodes":[
          /*    {"title":"1.0点资源管理","link":"/OldDotController","active":false},
              {"title":"1.0线资源管理","link":"/OldLineController","active":false},
              {"title":"1.0面资源管理","link":"/OldFaceController","active":false},
              {"title":"摄像头管理","link":"/CameraController","active":false},*/
           /*   {"title":"WIFI探针管理","link":"/WIFIController","active":false},
              {"title":"人员流动管理","link":"/PersonnelController","active":false},*/
              {"title":"场所管理","link":"/SiteController","active":false},
              {"title":"场馆管理","link":"/VenueController","active":false},
              {"title":"党政机关","link":"/UnitsController","active":false},
              {"title":"一场四站管理","link":"/AirportsAndRailwayStationsController","active":false},
              {"title":"住地管理","link":"/DomicileController","active":false},
              {"title":"指挥部管理","link":"/HeadquartersController","active":false},
              {"title":"安保线路管理","link":"/CircuitController","active":false},
              {"title":"三圈管理","link":"/ThreeCircleController","active":false},
              {"title":"封控圈管理","link":"/TrafficControlLoopController","active":false},
              {"title":"辖区管理","link":"/areaController","active":false},
              {"title":"图标管理","link":"/IconController","active":false},
            ]
          },
          {
            "thisChildrenShow":false,
            "title":"重点人信息管理",
            "navType":"ZDR",
            "childrenNodes":[
              {"title":"重点人管理","link":"/keyPersonListController","active":false},
              {"title":"重点人类型","link":"/keyPersonClassController","active":false},
            ]
          },
          {
            "thisChildrenShow":false,
            "title":"预案管理",
            "navType":"",
            "childrenNodes":[
              {"title":"应急物资","link":"/CaseResourceController","active":false},
              {"title":"处置预案","link":"/CaseListController","active":false},
              {"title":"专家管理","link":"/SpeciaListController","active":false},
              {"title":"专家组管理","link":"/SpecialistArrController","active":false},
            ]
          },
          {
            "thisChildrenShow":false,
            "title":"系统",
            "navType":"",
            "childrenNodes":[
              {"title":"审计日志","link":"/loggingWriteController","active":false},
              {"title":"字典管理","link":"/dictionaryController","active":false},
              {"title":"地图菜单","link":"/mapMenuController","active":false},
            ]
          },
          {
            "thisChildrenShow":false,
            "title":"中台监控平台",
            "navType":"",
            "childrenNodes":[
              {"title":"数据源配置","link":"/dataSourcesController","active":false},
              {"title":"数据内容定义","link":"/dataContentDefController","active":false},
              {"title":"任务配置","link":"/taskConfigController","active":false},
              {"title":"任务监控","link":"/taskMonitorController","active":false},
              {"title":"数据接入","link":"/kafkaDataAccessSituationController","active":false},
            ]
          },
        ];
        //console.log(this.webAdmin);
      }
    },
    methods:{

      navNodeShow:function (item) {
        item.thisChildrenShow = !item.thisChildrenShow;
        // //console.log(show);
        //this.nodesFadeInObj[show] = !this.nodesFadeInObj[show];
        // //console.log(show.defaultState);
      },
      staticNavNodeShow:function () {
        this.nodesFadeInObj.msgController = !this.nodesFadeInObj.msgController;
        // //console.log(show);
        //this.nodesFadeInObj[show] = !this.nodesFadeInObj[show];
        // //console.log(show.defaultState);
      },
      setActive(item){
        //debugger
        //console.log(item);
        for( let i=0;i<this.nodesLink.length;i++ ){
          for( let k=0;k<this.nodesLink[i].childrenNodes.length;k++ ){
            this.nodesLink[i].childrenNodes[k].active = false;
          }
        }
        this.isActive = item.link
        item.active = !item.active;
      },
      /**
       * 三级菜单渲染后点击二级菜单展现和隐藏
       * @param e 点击触发的事件
       */
      threeShowTag (e){
        if (e.target.lastChild.style.display !== 'block'){
          e.target.lastChild.style.display = 'block'
        }
        else {
          e.target.lastChild.style.display = 'none'
        }
      },
      hiddenHelp(e) {
        this.$store.commit('sethelpMessage', {
          isShow: false,
          url: e.srcElement.children[0].href.split('#/')[1],
          offsetTop: e.srcElement.offsetTop
        });
        ////console.log("hiddenHelp");
      },
      showHelp (e) {
        this.$store.commit('sethelpMessage', {
          isShow: true,
          url: e.srcElement.children[0].href.split('#/')[1],
          // offsetTop: e.srcElement.offsetTop
          offsetTop: e.srcElement.getBoundingClientRect().top
        });
       // //console.log("showHelp",e.srcElement.children[0].href.split('#/')[1]);
      },

    }, // methods end
    watch: {
      $route: { //路由监听
        handler: function(val, oldVal){
          //console.log(val.fullPath);
          //console.log(this.isLogin());

          if( val.fullPath !== "/login" ){
            /*  if( !this.isLogin() ){
                this.$router.push({path:"/login"});
              }*/
          }
        },
        // 深度观察监听
        deep: true
      }
    },
  }
</script>

<style scoped>
  .nav-active,
  .router-link-exact-active{
    color: #fff ;
  }

</style>
